/**
 * Copyright (c) 2010 Basil Shikin, BugStat Project
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.bugstat.common.reports;

import java.util.List;

/**
 * This interface defines a bug report that could be generated by a report generator.
 *
 * @author Basil Shikin
 *
 */
public interface Report
{
    /**
     * Get value for a given report key. This should be a fast operation: report
     * should be generated and loaded in memory.
     * 
     * @param key Key to return value for.
     * 
     * @return Report value for given keys.
     */
    public ReportValue getValueFor( ReportKey key );
    
    /**
     * Get available report keys. Note that result is an ordered list. This order
     * should be preserved when displaying the report.
     * 
     * @return Ordered list of report key. 
     */
    public List<? extends ReportKey> getKeys();
    
    /**
     * Get report type. This is a directive to report renderer that defines
     * what kind of diagram should be used for this report.
     * 
     * @return Report type.
     */
    public ReportType getType();
    
    /**
     * Get localized name of the report.
     * 
     * @return Report name that should be displayed to the user.
     */
    public String getName();
    
    /**
     * Get localized name of the group this report should be displayed under.
     *  
     * @return Report group name (will be displayed to the user).
     */
    public String getGroup();
    
    /**
     * Get localized name of report key
     * 
     * @return Report key name (will be displayed to the user).
     */
    public String getKeyName();
    
    /**
     * Get localized name of report values
     * 
     * @return Report value name.
     */
    public ReportValueName getValueName();

    /**
     * True if report should be visible by default. For most reports, it should be false. Only
     * major reports, like 'open bugs' should be visible by default. 
     * 
     * @return
     */
	public boolean isVisibleByDefault();
}
